cmake_minimum_required(VERSION 3.0)

project(CALC)

set(CMAKE_CXX_STANDARD 11)# 指定C++ 11标准
set(CMAKE_AR  D:/work/msys2/mingw64/bin/ar.exe)
set(CMAKE_C_COMPILER  D:/work/msys2/mingw64/bin/gcc.exe)
set(CMAKE_CXX_COMPILER  D:/work/msys2/mingw64/bin/g++.exe)
set(Suffix ".lib")

file(GLOB SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib )
include_directories(${PROJECT_SOURCE_DIR}/include) # 添加库文件目录
add_library(calc SHARED ${SRC})# 生成动态库.dll和静态库.a
add_library(cal1 STATIC ${SRC})# 添加静态库.a
add_library(calc2 ${SRC})

# add_executable(app ${SRC})
